package com.example.studentdemo.controller;


public class student {
    private int id;
    private String name;
    private int age;
    private String grade;


    public student(int id, String name, int age, String grade) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.grade = grade;
    }

    public student() {}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    @Override
    public String toString() {
        return "学生信息如下"+
                "姓名=  " + name + ", 年龄=  " + age + ", 学号=  " + id + ", 班级=  " + grade;
    }
}
